package day04;

import java.util.Scanner;

public class Method04 {                                 //复制数组并返回的方法
    public static void main(String[] args) {
        int[] arr1={1,2,3,4,5};
        Scanner sc=new Scanner(System.in);
        int left=sc.nextInt();
        int right=sc.nextInt();
        int[] newarray=copyOfRange(arr1,left,right);
        for (int i = 0; i < newarray.length; i++) {
            System.out.println(newarray[i]);
        }
    }
    public static int[] copyOfRange(int[] arr, int from, int to){
        int arrlength=to-from;
        int[] temp=new int[arrlength];
        for (int i = 0; i < arrlength; i++) {
            temp[i]=arr[from+i];
        }
        return temp;
    }
}
